﻿using System;
using System.IO;
using UnityEngine;

// Token: 0x0200040C RID: 1036
public class FileData
{
	// Token: 0x060019E3 RID: 6627 RVA: 0x000A63B8 File Offset: 0x000A45B8
	public FileData(string rootName = "")
	{
		this.rootName = rootName;
	}

	// Token: 0x060019E4 RID: 6628 RVA: 0x000A63D4 File Offset: 0x000A45D4
	public string Create(string name)
	{
		string text = this.Path + name;
		if (!Directory.Exists(text))
		{
			Directory.CreateDirectory(text);
		}
		return text + '/';
	}

	// Token: 0x17000278 RID: 632
	// (get) Token: 0x060019E5 RID: 6629 RVA: 0x000A6410 File Offset: 0x000A4610
	public string Path
	{
		get
		{
			string text;
			if (Application.isEditor || Application.platform == RuntimePlatform.WindowsPlayer)
			{
				text = Application.dataPath + "/../";
			}
			else
			{
				text = Application.persistentDataPath + "/";
			}
			if (this.rootName != string.Empty)
			{
				text = text + this.rootName + '/';
			}
			return text;
		}
	}

	// Token: 0x04001CD4 RID: 7380
	private string rootName = string.Empty;
}
